Deploying Kanzi applications to Linux

Before you can build a Kanzi application for your target platforms, set up and configure the Kanzi build environment for your target platforms. The build environment includes tools that the Kanzi build system uses to build your application for your target platforms.

The most convenient way to build Kanzi applications for Linux is to do the building on Linux. If you have the Linux toolchain for Windows, you can build Kanzi applications for Linux on Windows. In that case point the Kanzi build scripts to that toolchain. See Installing the Kanzi build environment manually.

You can configure the input event devices that Kanzi listens to on Linux ports where the native windowing system does not provide input device handling. See Input event devices on Linux.

Building Kanzi application for Linux

SCons runs the SConstruct file in the configuration directory of the platform from which you run the scons command. SConstruct file is the entry point for building the application and contains the information about the Kanzi Engine location and runs these files:

To build Kanzi applications for Linux:

  1. Open the command line in the configuration directory of the platform for which you want to build the Kanzi application (<ProjectName>/Application/configs/platforms/<PlatformName>) and make sure you have the correct environmental variables set. See Setting the Kanzi environment variables.
    For example, to build your Kanzi application for:
  2. Run the scons command with the build parameters for your Kanzi application.

    Syntaxscons <library> <type> <name>
    Parameters
    library

    (Optional) the graphics library:

    • ES2 builds the application with OpenGL ES 2.0
    • GL builds the application with OpenGL
    type

    (Optional) the build type:

    • Release builds the application with compiler optimizations enabled. The release option builds smaller files than the debug option. Use this option for production purposes. Default value.
    • Debug builds the application with disabled compiler optimizations and contains full debug information you can use with a debugger. The debug option builds larger files and debug applications run slower. Use this option for development purposes.
    • Profiling builds the application with compiler optimizations enabled and links the application against the Profiling build. Use this option when you want to measure the performance of different parts of Kanzi Engine. For example, when you want to find out how much time Kanzi uses on different tasks during application startup, or which parts of the application take a lot of time to run. See Measuring application performance.
    name(Optional) the name of the project
    Examples

    // Builds the application with the default settings as specified
    // in config.py and SConstruct configuration files.
    scons
    // Builds the debug version of the application with
    // the OpenGL graphics library.
    scons GL debug
    // Builds the debug version of the application with the
    // OpenGL ES 2.0 graphics library from the Kanzi Studio
    // project named MyProject.
    scons ES2 debug MyProject

    Scons builds the Kanzi application source code and binary files in the <ProjectName>/Application/output directory.

See also

Installing the Kanzi build environment manually

Deploying Kanzi applications

Configuring your application